/**
 * 党务监督api
 */

import request from '@/utils/request'
import {
    unionApiUrl
} from '@/api/config.js'

const supervisePartyActivity = unionApiUrl + "/supervisePartyActivity" //三重一大api

const supervisePrjectMonthReport = unionApiUrl + "/supervisePrjectMonthReport" //项目监督月报api

const superviseTaskDown = unionApiUrl + "/superviseTaskDown" //下达api

const superviseTaskUp = unionApiUrl + "/superviseTaskUp" //上报Api


/**
 * 三重一大api
 */
// 三重一大列表
export function getPageSupervisePartyActivity(data) {
    return request.post(`${supervisePartyActivity}/getPageSupervisePartyActivity`, data)
}

// 删除 -三重一大
export function deleteSupervisePartyActivity(data) {
    return request.post(`${supervisePartyActivity}/deleteByPrimaryKey`, data)
}

// 详情 - 三重一大
export function getSupervisePartyActivity(id) {
    return request.get(`${supervisePartyActivity}/getSupervisePartyActivityById/${id}`)
}

// 新增 -三重一大
export function addSupervisePartyActivity(data) {
    return request.post(`${supervisePartyActivity}/insertSelective`, data)
}

// 编辑 - 三重一大
export function updateSupervisePartyActivity(data) {
    return request.post(`${supervisePartyActivity}/updateByPrimaryKeySelective`, data)
}

/**
 * 项目监督月报api
 */
// 列表-项目监督月报
export function getPageProjectSupervision(data) {
    return request.post(`${supervisePrjectMonthReport}/getPageSupervisePrjectMonthReport`, data)
}

// 删除 -项目监督月报
export function deleteProjectSupervision(data) {
    return request.post(`${supervisePrjectMonthReport}/deleteByPrimaryKey`, data)
}

// 详情 - 项目监督月报
export function getProjectSupervision(id) {
    return request.get(`${supervisePrjectMonthReport}/getSupervisePrjectMonthReportById/${id}`)
}

// 新增 -项目监督月报
export function addProjectSupervision(data) {
    return request.post(`${supervisePrjectMonthReport}/insertSelective`, data)
}

// 编辑 - 项目监督月报
export function updateProjectSupervision(data) {
    return request.post(`${supervisePrjectMonthReport}/updateByPrimaryKeySelective`, data)
}

/**
 * 监督任务下达api
 */
// 列表-监督任务下达
export function getPageSuperviseTaskDown(data) {
    return request.post(`${superviseTaskDown}/getPageSuperviseTaskDown`, data)
}

// 任务下达
export function downTaskByDownId(id) {
    return request.get(`${superviseTaskDown}/downTaskByDownId/${id}`)
}
// 删除 -监督任务下达
export function deleteSuperviseTaskDown(data) {
    return request.post(`${superviseTaskDown}/deleteByPrimaryKey`, data)
}

// 详情 - 监督任务下达
export function getSuperviseTaskDown(id) {
    return request.get(`${superviseTaskDown}/getSuperviseTaskDownById/${id}`)
}

// 新增 -监督任务下达
export function addSuperviseTaskDown(data) {
    return request.post(`${superviseTaskDown}/insertSelective`, data)
}

// 编辑 -监督任务下达
export function updateSuperviseTaskDown(data) {
    return request.post(`${superviseTaskDown}/updateByPrimaryKeySelective`, data)
}

/**
 * 监督任务上报api
 */
// 列表-监督任务上报
export function getPageSuperviseTaskUp(data) {
    return request.post(`${superviseTaskUp}/getPageSuperviseTaskUp`, data)
}

// 详情 - 监督任务上报
export function getSuperviseTaskUp(id) {
    return request.get(`${superviseTaskUp}/getSuperviseTaskUpById/${id}`)
}

// 编辑 -监督任务上报
export function updateSuperviseTaskUp(data) {
    return request.post(`${superviseTaskUp}/updateByPrimaryKeySelective`, data)
}